package cn.ffcs.bpm.service;


import java.util.List;

import org.hibernate.criterion.Criterion;

import cn.ffcs.base.service.BaseService;
import cn.ffcs.bpm.dao.NextTepDAO;
import cn.ffcs.bpm.dao.ProcessConfigDAO;
import cn.ffcs.bpm.dao.ProcessConfigDetailDAO;
import cn.ffcs.bpm.dao.ProcessStepDAO;
import cn.ffcs.bpm.dao.TransactProcessStatusDAO;
import cn.ffcs.bpm.dao.TransactorDAO;
import cn.ffcs.bpm.model.TransactProcessStatus;
import cn.ffcs.bpm.model.Transactor;
import cn.ffcs.businessrequest.service.BusinessRequestService;
import cn.ffcs.security.model.User;
import cn.ffcs.util.context.ApplicationContextUtil;

/**
 * 流程办理状态服务层<br/>
 * <table>
 * <tr>
 * <td>负责人/principal:</td>
 * <td colspan="2">pany</td>
 * <tr>
 * <td>修改记录/revision:</td>
 * <td colspan="2"></td>
 * </tr>
 * <tr>
 * <td>日期:</td>
 * <td>修改人:</td>
 * <td>修改说明:</td>
 * </tr>
 * <tr>
 * <td></td>
 * <td></td>
 * <td></td>
 * </tr>
 * </table>
 * @author pany
 * @version $Id$
 */
public class TransactProcessStatusService<D extends TransactProcessStatus> extends BaseService<D>
implements ITransactProcessStatusService<D>
{
    /** 流程办理状态DAO **/
    private TransactProcessStatusDAO transactProcessStatusDAO;
    /** 流程步骤DAO **/
    private ProcessStepDAO processStepDAO;
    /** 所属流程DAO **/
    private ProcessConfigDAO processConfigDAO;
    /** 流程节点DAO **/
    private ProcessConfigDetailDAO processConfigDetailDAO;
    /** 下一流程DAO **/
    private NextTepDAO nextTepDAO;
    /** 办理人DAO **/
    private TransactorDAO transactorDAO;

    /**
     * 
     * TODO 重写列表
     * @param cond
     * @return
     */
    public List<D> findbytp(Criterion cond){
        return transactProcessStatusDAO.findBy(cond);
    }
    
    public void remove(Object entity, String fParam, String fParamValue)
    {
        // TODO Auto-generated method stub
        transactProcessStatusDAO.remove(entity, fParam, fParamValue);
    }

    public void processBusinessRequest(D transactProcessStatus)
    {
        // TODO Auto-generated method stub
        
    }
    
    /**
     * 新增或修改操作
     * @param baseEntity
     */
    public void saveOrUpdate(D transactProcessStatus){
        transactProcessStatus.setRefEntity("cn.ffcs.businessrequest.model.BusinessRequest");
        super.saveOrUpdate(transactProcessStatus);
        
    }
    
    /**
     * 新增或修改操作
     * @param baseEntity
     */
    public void submit(D transactProcessStatus){
        
        
    }
    
    public NextTepDAO getNextTepDAO()
    {
        return nextTepDAO;
    }

    public void setNextTepDAO(NextTepDAO nextTepDAO)
    {
        this.nextTepDAO = nextTepDAO;
    }

    public ProcessConfigDAO getProcessConfigDAO()
    {
        return processConfigDAO;
    }

    public void setProcessConfigDAO(ProcessConfigDAO processConfigDAO)
    {
        this.processConfigDAO = processConfigDAO;
    }

    public ProcessConfigDetailDAO getProcessConfigDetailDAO()
    {
        return processConfigDetailDAO;
    }

    public void setProcessConfigDetailDAO(
            ProcessConfigDetailDAO processConfigDetailDAO)
    {
        this.processConfigDetailDAO = processConfigDetailDAO;
    }

    public ProcessStepDAO getProcessStepDAO()
    {
        return processStepDAO;
    }

    public void setProcessStepDAO(ProcessStepDAO processStepDAO)
    {
        this.processStepDAO = processStepDAO;
    }

    public TransactorDAO getTransactorDAO()
    {
        return transactorDAO;
    }

    public void setTransactorDAO(TransactorDAO transactorDAO)
    {
        this.transactorDAO = transactorDAO;
    }

    public TransactProcessStatusDAO getTransactProcessStatusDAO()
    {
        return transactProcessStatusDAO;
    }

    public void setTransactProcessStatusDAO(
            TransactProcessStatusDAO transactProcessStatusDAO)
    {
        this.transactProcessStatusDAO = transactProcessStatusDAO;
    }



    
}
